package org.test.ping.utils

import org.springframework.boot.test.context.SpringBootTest
import org.test.ping.Utils.RateLimiterUtil
import spock.lang.Specification
import spock.lang.Unroll

@SpringBootTest
class RateLimiterUtilTest extends Specification{

    @Unroll
    def "test rate limiter"(){
        given:
        def rate = new RateLimiterUtil()
        expect:
        rate.tryLock(FileName,1L) == result
        where:
        FileName         || result
        "d:\\ping.json"  || true
    }
}
